#e
#Title[uR-Hard-v]
#Text[G@ĹuFEVv]
#ScriptVersion[2]
#PlayLevel[Hard]
#Player[FREE]

script_enemy_main {
 let img = "script\img\ExRumia.png";
 let name = "uR-Hard-v";
 let pet = 0;
 let angle = 0;

 @Initialize {
  CutIn(KOUMA, name, "", 0, 0, 0, 0);
  SetX(GetCenterX);
  SetY(GetCenterY);
  SetLife(8000);
  SetScore(1000000);

  LoadGraphic(img);
  SetTexture(img);
  SetGraphicRect(64, 0, 128, 64);

  TMain;
 }

 @MainLoop {
  SetCollisionA(GetX, GetY, 24);
  SetCollisionB(GetX, GetY, 24);

  pet += 1;
  if(pet == 60) {
   CreateShot01(GetX, GetY, 2, rand(0, 360), RED11, 0);
   CreateShot01(GetX, GetY, 2, rand(0, 360), RED11, 0);
   CreateShot01(GetX, GetY, 2, rand(0, 360), RED11, 0);
   CreateShot01(GetX, GetY, 2, rand(0, 360), RED11, 0);
   CreateShot01(GetX, GetY, 2, rand(0, 360), RED11, 0);
   CreateShot01(GetX, GetY, 2, rand(0, 360), RED11, 0);
   CreateShot01(GetX, GetY, 2, rand(0, 360), RED11, 0);
   CreateShot01(GetX, GetY, 2, rand(0, 360), RED11, 0);
   CreateShot01(GetX, GetY, 2, rand(0, 360), RED11, 0);
   CreateShot01(GetX, GetY, 2, rand(0, 360), RED11, 0);
  }
  if(pet == 60) {
   loop(18) {
    CreateShotA(1, GetX, GetY, 0);
    SetShotDataA(1, 0, 5, rand(0, 5) + angle, 0, 0, 2, BLUE03);
    SetShotDataA(1, 30, 0.5, NULL, 0, 0, 0.5, BLUE03);
    angle += 20;
    FireShot(1);
    pet = 0;
   }
  }

  yield;
 }

 @DrawLoop {
  DrawGraphic(GetX, GetY);
 }

 @Finalize {
  DeleteGraphic(img);
 }

 task TMain {
  yield;

  TShot;
 }

 task TShot {
  yield;
 }

}